/*
   Machine Apparatus - Origin of Clocktower(220080001)
   By Buya
*/

void npc(Player @player, NPC @npc) {
    int state = npc.getState();
    if(state == 0) {
        npc.addText("Beep... beep... you can make your escape to a safer place through me. Beep... beep... would you like to leave this place?");
        npc.sendYesNo();
    }
    else if(state == 1) {
        if(npc.getSelected() == YES) {
           player.changeMap(220080000);
        }
        npc.end();
    }
}